﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace EMR.Data.Models
{
    /// <summary>
    /// 基本信息
    /// </summary>
    public partial class BaseInfo
    {
        /// <summary>
        /// 签署知情同意书日期
        /// </summary>
        public DateTime AgreeTime { get; set; }
        /// <summary>
        /// 药物编号
        /// </summary>
        public string MedicineCode { get; set; }
        /// <summary>
        /// 性别
        /// </summary>
        public GenderEnum Gender { get; set; }
        /// <summary>
        /// 生日
        /// </summary>
        public DateTime Birthday { get; set; }
        /// <summary>
        /// 身高，单位厘米
        /// </summary>
        public decimal Height { get; set; }
        /// <summary>
        /// 体重，单位千克
        /// </summary>
        public decimal Weight { get; set; }
        /// <summary>
        /// 电话号码
        /// </summary>
        public string Phone { get; set; }
        /// <summary>
        /// 住院号
        /// </summary>
        public string HospitalCode { get; set; }
        /// <summary>
        /// 病程，月
        /// </summary>
        public int Course { get; set; }
        /// <summary>
        /// 家族史
        /// </summary>
        public string FamilyHistory { get; set; }
        /// <summary>
        /// 药物过敏史
        /// </summary>
        public string AllergyHistory { get; set; }
        /// <summary>
        /// 西药诊断
        /// </summary>
        public string WestDiagnose { get; set; }
        /// <summary>
        /// 病理
        /// </summary>
        public string Pathology { get; set; }
        /// <summary>
        /// KPS评分
        /// </summary>
        public string KPS { get; set; }
        /// <summary>
        /// ECOG评分
        /// </summary>
        public string ECOG { get; set; }
        /// <summary>
        /// TNM分期
        /// </summary>
        public string TNM { get; set; }
        /// <summary>
        /// Dukes分期
        /// </summary>
        public string Dukes { get; set; }
        /// <summary>
        /// 手术
        /// </summary>
        public List<OperationItem> Operations { get; set; }
        /// <summary>
        /// 化疗
        /// </summary>
        public List<ChemoItem> Chemos { get; set; }
        /// <summary>
        /// 放疗
        /// </summary>
        public List<RadioItem> Radios { get; set; }
        /// <summary>
        /// 其他治疗
        /// </summary>
        public List<OtherCureItem> OtherCures { get; set; }
        /// <summary>
        /// 合并其它疾病及用药
        /// </summary>
        public List<OtherDiseaseItem> OtherDiseases { get; set; }
        /// <summary>
        /// 体温℃
        /// </summary>
        public decimal Temperature { get; set; }
        /// <summary>
        /// 心率 次/分
        /// </summary>
        public int HeartRate { get; set; }
        /// <summary>
        /// 呼吸 次/分
        /// </summary>
        public int Breath { get; set; }
        /// <summary>
        /// 最大血压 mmHg
        /// </summary>
        public int MaxBP { get; set; }
        /// <summary>
        /// 最小血压 mmHg
        /// </summary>
        public int MinBP { get; set; }
    }
    public partial class BaseInfo
    {
        /// <summary>
        /// 病历来源枚举
        /// </summary>
        public enum SourceEnum
        {
            /// <summary>
            /// 门诊
            /// </summary>
            Outpatient,
            /// <summary>
            /// 住院
            /// </summary>
            Hospitalized
        }
        /// <summary>
        /// 病例来源
        /// </summary>
        public SourceEnum Source
        {
            get
            {
                if (string.IsNullOrEmpty(HospitalCode))
                    return SourceEnum.Outpatient;
                else return SourceEnum.Hospitalized;
            }
        }
        /// <summary>
        /// 是否有家族史
        /// </summary>
        public bool HasFamilyHistory
        {
            get
            {
                return !string.IsNullOrEmpty(FamilyHistory);
            }
        }
        /// <summary>
        /// 是否有药物过敏史
        /// </summary>
        public bool HasAllergyHistory
        {
            get
            {
                return !string.IsNullOrEmpty(AllergyHistory);
            }
        }
    }
}
